package com.mvu.banana.user.client;

import com.google.gwt.user.client.ui.HasName;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ListBox;
import com.mvu.banana.common.widget.GWTUtil;
import com.mvu.banana.domain.client.MyConstants;

/**
 */
public class AgeRangeInput extends HorizontalPanel implements HasName{
  public AgeRangeInput(ListBox min, ListBox max){
    add(min);
    GWTUtil.initListBox(min, "15", "15", 16, 80);
    add(new Label(MyConstants.get.to()));
    add(max);
    GWTUtil.initListBox(max, "99", "99", 98, 15);
  }

  @Override
  public void setName(String name) {
    // empty
  }

  @Override
  public String getName() {
    return "age";
  }
}
